<?php
/*
 *  @author Nicolas Genevaux
 * (c)nige 2008
 */
	include_once($RACINE.'inc/fct.basedonnee.php');
	include_once($RACINE.'inc/fct.utils.php');
	include_once($RACINE.'inc/sql.matiere.php');
	include_once($RACINE.'inc/sql.matiereinscritmatiere.php');
	include_once($RACINE.'inc/sql.exercicematieredate.php');
	$res = doSQL($MATIEREINSCRITMATIERE_SELECT_INS,array(0=>$_SESSION['ID_CONECT'],1=>$_GET['idmat']));
	if($res['total']<=0) {
		redirect($PAGE_ACCUEIL_INSCRIT);
	}
	$res = doSQL($MATIERE_SELECT_ID,array(0=>$_GET['idmat']));
	$nomMatiere = $res['matiere'];
	$res = doSQLArray($EXERCICEMATIEREDATE_SELECT_MAIN,array(0=>$_SESSION['ID_CONECT'],1=>$_GET['idmat']));
	$_SESSION['courbeEvolution'] = array();
	for($i=10;$i>-1;$i--) {
		if($res[$i]) {
			$_SESSION['courbeEvolution'][10-$i-$j] = $res[$i]['result'];
		}
		else {
			$j++;
		}
	}
	$_SESSION['IDMATIEREDETAIL'] = $_GET['idmat'];
?>
